package com.patternsbox.behavioral.command;

import com.patternsbox.ActionTemplate;

public class CommandAction extends ActionTemplate {

	public void doAction() {
	      // Create receiver, command, and invoker
	      Receiver receiver = new Receiver();
	      Command command = new ConcreteCommand(receiver);
	      Invoker invoker = new Invoker();
	      // Set and execute command
	      invoker.setCommand(command);
	      invoker.executeCommand();
	}
}
